package com.chen.service.material;

import com.chen.pojo.Material;
import com.chen.vo.MaterialVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface MaterialService {
    //增加一个物资
    int addMaterial1(Material material);

    //根据id删除物资
    int deleteMaterialById(int materialId);

    //修改一个物资的信息
    int updateMaterial1(Material material);

    //根据id查询物资
    Material queryMaterialById(int materialId);

    //根据品牌查询物资
    List<Material> queryMaterialByBrand(String materialBrand);

    //根据名称模糊查询
    List<Material> queryMaterialLike(String value);

    //查询全部物资，返回list集合
    List<Material> queryAllMaterial();

    /**
     * 查询物资列表
     * @return
     */
    List<Material> list(MaterialVo materialVo);

    /**
     * 添加一个物资
     * @param material
     * @return
     */
    int addMaterial(Material material);

    /**
     * 修改一个物资
     * @return
     */
    int updateMaterial(Material material);
}
